package com.it.park.dao;

import com.it.park.dao.base.BaseMapper;
import com.it.park.model.ResourceComment;

public interface ResourceCommentMapper extends BaseMapper<ResourceComment>{
	/**
	 * 根据用户ID和资源ID判断该用户是否已经收藏过
	 * @param record
	 * @return
	 */
	ResourceComment selectIsExist(ResourceComment record);
	
	/**
	 * 计算评论平均分
	 * @param resourceId
	 * @return
	 */
	Integer selectAvgScore(Integer resourceId);
}